#ifndef Fat_Func_H_
#define Fat_Func_H_

#include <ff.h>
#include <integer.h>
#include <Config.h>
//void ff_test_term_timerproc(void) __attribute__ ((section(".ramfunc")));
int CreateFile(char* filename);
unsigned long WriteFile(char* filename, const char* data,unsigned long ofs);
void AppendFile(char* filename, char* data);
void CreateNewFile(char* filename, BYTE mode);
int MountingSDcard();
unsigned int ReadFileText(char* filename, char* str, unsigned int size,
		DWORD ofs); //if end file return -1, else return index f_lseek(index)
unsigned int ReadFileNonText(char* filename, void* str, unsigned int size,
		DWORD ofs);
int ListDir(const char *PATH, FILINFO *List);
unsigned int CheckIfFile(char* filename);
unsigned int CheckIfWAV(char *filename, WAV_INFO* WAV_info);
void CloseWAVFile(WAV_INFO wav_info);
uint16_t ReadWAVFile(WAV_INFO wav_info,uint8_t *flag_end);
void PathGoBack(char *PATH);
#endif

